PRNAME = "program.exe"
CFLAGS = -Wall -O2
all: $(PRNAME)
$(PRNAME): solve.o solve.h BigInt.o bigint.h BigIntPtr.o bigintptr.h main.o
	g++ $(CFLAGS) solve.o BigInt.o  main.o BigIntPtr.o -o $(PRNAME)
main.o: main.cpp solve.h bigint.h bigintptr.h
	g++ $(CFLAGS) -c main.cpp
solve.o: solve.cpp
	g++ $(CFLAGS) -c solve.cpp
BigInt.o: BigInt.cpp
	g++ $(CFLAGS) -c BigInt.cpp
BigIntPtr.o: bigintptr.cpp
	g++ $(CFLAGS) -c BigIntPtr.cpp
run: $(PRNAME)
	$(PRNAME)
clean:
	rm -f *.o *.h.gch *.out *.out